package edu.sctu.xialei.May.day20150518two.usage_Of_Array;

import java.util.Arrays;

/**
 * Created by Administrator on 2015/5/18 0018.
 */
public class UsageArrayClass {

    public int [] setValue (){
        int []array_one;
        array_one = new int[]{9,3,20,4,1,7,3,2,0,-7} ;

        Arrays.sort(array_one);
        return array_one;
    }

    public int[] other_operation  (int[] array1){

        int[] array2 = new int[array1.length];

        Arrays.fill(array2,10);

        System.out.println("\n\n***fill***");
        System.out.println(array2[3]);
        System.out.println("\n\n***copy***");

       array2 =  Arrays.copyOf(array1,array1.length);

        return array2;
    }
}
